#include<bits/stdc++.h>
using namespace std;

int main()
{
	int n,i,j,x,y;
	cin>>n>>i>>j;
	for(x = i, y = 1;y <= n;y++)
		printf("(%d,%d)", x, y);
	cout<<endl;
	for(x = 1, y = j;x <= n;x++)
		printf("(%d,%d)", x, y);
	cout<<endl;
	x = i, y = j;
	while(x-1 > 0 && y-1 > 0)
	{
		x--; 
		y--;
	}
	for(;x <= n && y <= n;x++, y++)
		printf("(%d,%d)", x, y);
	cout<<endl;
	x = i, y = j;
	while(x+1 <= n && y-1 >= 1)
	{
		x++;
		y--;
	}
	for(;x >= 1 && y <= n;x--, y++)
	printf("(%d,%d)",x,y); 
    return 0;
}
